package com.gxa.business.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class Field implements Serializable {

  @TableId(type = IdType.ASSIGN_ID)
  private String id;
  private Integer code;
  private String name;
  @JsonFormat(pattern="yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
  private Timestamp createTime;
  @TableLogic
  private Byte status;

  public Field(String name, Timestamp createTime, Byte status) {
    this.name = name;
    this.createTime = createTime;
    this.status = status;
  }

  public Field(String id, String name, Timestamp createTime, Byte status) {
    this.id = id;
    this.name = name;
    this.createTime = createTime;
    this.status = status;
  }
}
